/**
 * @Copyright ®2015 Sinosoft Co. Ltd. All rights reserved.
 * 项目名称 : 互联网保险服务平台
 * 创建日期 : 2017-10-18
 * 修改历史 :
 * 1. [2017-10-18]创建文件 by chenxin
 */
package com.gavinwind.inspay.center.configserver.enviroment;

import org.springframework.cloud.config.environment.Environment;
import org.springframework.cloud.config.server.environment.EnvironmentRepository;

/**
 * 【类或接口功能描述】
 * @author chenxin
 * @date 2017-10-18 下午3:11 
 * @version V1.0
 */
class DatabasesEnvironmentRepository implements EnvironmentRepository {
//    @Autowired
//    private ConfigRepositoryService configRepositoryService;

    public Environment findOne(String application, String profile, String label) {
//        if (StringUtils.isEmpty(application) || StringUtils.isEmpty(profile))
//            return null;
//        ConfigRepository configRepositories = configRepositoryService.findByApplicationAndProfileAndLabel(application, profile, label);
//        if (configRepositories != null) {
//            Environment environment = new Environment(application, StringUtils.commaDelimitedListToStringArray(profile), label, configRepositories.getVersion());
//            for (ConfigProperties configProperties : configRepositories.getConfigPropertiesList()) {
//                environment.add(new PropertySource(configProperties.getPropertiesName(), configProperties.getContent()));
//            }
//            return environment;
//        }
//        return new Environment(application, profile);
        return null;
    }
}